package com.hlkj.pay.common;

import com.hlkj.framework.common.exception.IErrorCode;
import com.hlkj.pay.common.constants.ResultCodeConstant;
/**
 * @author HlpayTeam
 * @date 2024/09/06 18:20
 */
public enum AdminUserResultCode implements IErrorCode {
    // 角色
    ROLE_DOES_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+1, "角色已存在"),
    ROLE_DOES_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+2, "角色不存在"),
    
    // 角色
    ROLE_ADMIN_DOES_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+3, "管理员角色已存在"),
    ROLE_DEFAULT_DOES_NOT_DELETE(ResultCodeConstant.ADMIN_USER_PREFIX+4, "默认角色不可删除"),
    //组织
    ORGANIZATION_DOES_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+101, "组织已存在"),
    ORGANIZATION_DOES_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+102, "组织不存在"),
    PARENT_ORGANIZATION_DOES_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+103, "父组织不存在"),
    //菜单
    MENU_DOES_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+201, "菜单名称已存在"),
    MENU_DOES_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+202, "菜单不存在"),
    MENU_CHILD_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+203, "菜单存在下级,不可删除"),
    
    
    //用户
    USER_DOES_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+301, "用户已存在"),
    USER_DOES_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+302, "用户不存在"),
    USER_PHONE_DOES_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+303, "用户手机号不存在"),
    ADMIN_USER_DOES_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+304, "管理员不存在"),
    USER_EMAIL_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+305, "用户邮箱已存在"),
    USER_PHONE_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+306, "用户手机号已存在"),

    
    //用户登录相关
    USER_PWD_ERROR(ResultCodeConstant.ADMIN_USER_PREFIX+401, "用户密码错误"),
    USER_PERMISSION_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+402, "用户权限不存在"),
    USER_PART_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+403, "用户部门不存在"),
    USER_PERMISSION_EXPIRED(ResultCodeConstant.ADMIN_USER_PREFIX+404, "用户权限已变更，需要重新加载"),
    USER_PERMISSION_NOT_ACCESS(ResultCodeConstant.ADMIN_USER_PREFIX+405, "用户权限不可访问当前资源"),
    USER_ROLE_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+406, "用户角色不存在"),
    
    TOKEN_USER_INFO_NOT_EFFECT(ResultCodeConstant.ADMIN_USER_PREFIX+407, "用户不是启用状态"),
    TOKEN_USER_INFO_SYS_TYPE_NOT_EFFECT(ResultCodeConstant.ADMIN_USER_PREFIX+408, "用户平台类型不合法"),
    SECOND_PASSWORD_IS_INCONSISTENT(ResultCodeConstant.ADMIN_USER_PREFIX+409, "二次密码不一致"),
    TEAMS_DOES_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+501, "团队已存在"),
    TEAMS_DOES_NOT_EXIST(ResultCodeConstant.ADMIN_USER_PREFIX+502, "团队不存在"),


    USERNAME_LENGTH_ERROR(ResultCodeConstant.ADMIN_USER_PREFIX+503, "用户名长度必须大于6位"),

    USERNAME_FIRST_MUST_BE_ENGLISH(ResultCodeConstant.ADMIN_USER_PREFIX+504, "用户名首字符必须是英文"),

    USERNAME_HAS_SENSITIVE(ResultCodeConstant.ADMIN_USER_PREFIX+505, "用户名不能含敏感字"),
    
    ;
    /**
     * 错误码
     */
    private Integer code;
    /**
     * 错误提示
     */
    private String msg;

    AdminUserResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }


}
